package iit.projects.etaxi.model.entity;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

public class Vehicle implements Serializable {
	
	private static final long serialVersionUID = 7551007298012082583L;

	private Long id;
	
	private String name;
	
	private String imageSrc;
	
	private Integer seatingCapcity;
	
	private Integer luggageCapacity;
	
	private Driver driver;
	
	private Set<VehicleLocation> vehicleLocations = new HashSet<VehicleLocation>(0);
	
	private boolean onHire;
	
	private Integer ratePerKm;

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the imageSrc
	 */
	public String getImageSrc() {
		return imageSrc;
	}

	/**
	 * @param imageSrc the imageSrc to set
	 */
	public void setImageSrc(String imageSrc) {
		this.imageSrc = imageSrc;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof Vehicle))
			return false;
		Vehicle other = (Vehicle) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}

	/**
	 * @param seatingCapcity the seatingCapcity to set
	 */
	public void setSeatingCapcity(Integer seatingCapcity) {
		this.seatingCapcity = seatingCapcity;
	}

	/**
	 * @return the seatingCapcity
	 */
	public Integer getSeatingCapcity() {
		return seatingCapcity;
	}

	/**
	 * @param luggageCapacity the luggageCapacity to set
	 */
	public void setLuggageCapacity(Integer luggageCapacity) {
		this.luggageCapacity = luggageCapacity;
	}

	/**
	 * @return the luggageCapacity
	 */
	public Integer getLuggageCapacity() {
		return luggageCapacity;
	}

	public Driver getDriver() {
		return driver;
	}

	public void setDriver(Driver driver) {
		this.driver = driver;
	}

	public Set<VehicleLocation> getVehicleLocations() {
		return vehicleLocations;
	}

	public void setVehicleLocations(Set<VehicleLocation> vehicleLocations) {
		this.vehicleLocations = vehicleLocations;
	}

	public boolean isOnHire() {
		return onHire;
	}

	public void setOnHire(boolean onHire) {
		this.onHire = onHire;
	}

	/**
	 * @param ratePerKm the ratePerKm to set
	 */
	public void setRatePerKm(Integer ratePerKm) {
		this.ratePerKm = ratePerKm;
	}

	/**
	 * @return the ratePerKm
	 */
	public Integer getRatePerKm() {
		return ratePerKm;
	}

}
